<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/style.css" />
    <script type="text/javascript" src="__JS__/jquery.js"></script>
    <script type="text/javascript" src="__JS__/jquery.sorted.js"></script>
    <script type="text/javascript" src="__JS__/bootstrap.js"></script>
    <script type="text/javascript" src="__JS__/ckform.js"></script>
    <script type="text/javascript" src="__JS__/common.js"></script>

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form class="form-inline definewidth m20" action="/Admin/News/select" method="POST">  
    
    <input type="text" name="title" id="title" class="abc input-default" placeholder="部分标题内容" value="{$sele}"/>&nbsp;&nbsp;  
    <button type="submit" class="btn btn-primary">查询</button>&nbsp;&nbsp; <button type="button" class="btn btn-success" id="addnew">新增广告</button>
</form>
<h2>正在显示的</h2>
<table class="table table-bordered table-hover definewidth m10" >
    <thead>
    <tr>
        <th>广告编号</th>
        <th>图片</th>
        <th>链接</th>
        <th>标题</th>
        
        <th>页数</th>
        <th>添加时间</th>
        <th>操作</th>
    </tr>
    </thead>
     <if condition = "count($banner) != 0">
    <volist name="banner" id="vo">
	     <tr>
            <td>{$vo.id}</td>
            <td><img src="/Uploads/{$vo.image}"/></td>
            <td>{$vo.url}</td>
            <td>{$vo.title}</td>
            
            <td>{$vo.lever}</td>
            <td>{$vo.create_time}</td>
            <td style=" text-align: center;">
                  <a href="/Admin/Banner/cancelBanner?id={$vo.id}">取消显示</a>
                  
            </td>
        </tr>
     </volist>
     <else />
     <tr>
     <td colspan = '6'>
     <span>现无广告播放</span>
     </td>
     </tr>
     </if>
      <tr><td colspan='10' >{$page}</td></tr>
      </table>
      <h2>未显示</h2>
<table class="table table-bordered table-hover definewidth m10" >
    <thead>
    <tr>
        <th>广告编号</th>
        <th>图片</th>
        <th>链接</th>
        <th>标题</th>
        
        <th>添加时间</th>
        <th>操作</th>
    </tr>
    </thead>
     <if condition = "count($bannert) != 0">
    <volist name="bannert" id="vot">
	     <tr>
            <td>{$vot.id}</td>
            <td><img src="/Uploads/{$vot.image}"/></td>
            <td>{$vot.url}</td>
            <td>{$vot.title}</td>
            
            <td>{$vot.create_time}</td>
            <td style=" text-align: center;width:100px;">
                  <a href="/Admin/Banner/showBanner?id={$vot.id}">显示</a>|<a href="/Admin/Banner/edit?id={$vot.id}">编辑</a>| <a href="/Admin/Banner/deleteBanner?id={$vot.id}" onclick = "return confirm('确认删除？删除后将无法复原！')">删除</a>
                  
            </td>
        </tr>
     </volist>
     <else />
     <tr>
     <td colspan = '6'>
     <span>无其他广告</span>
     </td>
     </tr>
     </if>
      <tr><td colspan='10' >{$paget}</td></tr>
      </table>
<div class="inline pull-right page">
</div>
</body>
</html>
<script>
    $(function () {
        
		$('#addnew').click(function(){

				window.location.href="/Admin/Banner/add";
		 });


    });

	function del(id)
	{
		
		
		if(confirm("确定要删除吗？"))
		{
		
			var url = "index.html";
			
			window.location.href=url;		
		
		}
	
	
	
	
	}
</script>